Modularity , and Rewriting Logic

نویسنده

  • Peter D. Mosses
چکیده

A complete formal semantic description of a practical programming language (such as Java) is likely to be a lengthy document, regardless of which semantic framework is being used. Good modularity of the description is important to the person(s) developing it, to facilitate reuse, change, and extension. Unfortunately, the conventional versions of the major semantic frameworks have rather poor modularity. In this paper, we rst recall some approaches that improve the modularity of denotational semantics, namely action semantics, modular monadic semantics, and a hybrid framework that combines these: modular monadic action semantics. We then address the issue of modularity in operational semantics, which appears to have received comparatively little attention so far, and report on some preliminary investigations of how one might achieve the same kind of modularity in structural operational semantics as the use of monad transformers can provide in denotational semantics|this is the main technical contribution of the paper. Finally, we brieey consider the representation of structural operational semantics in rewriting logic, and speculate on the possibility of using it to interpret programs in the described language. Providing powerful meta-tools for such semantics-based interpretation is an interesting potential application of rewriting logic; good modularity of the semantic descriptions may be crucial for the practicality of using the tools. Much of the paper consists of (very) simple examples of semantic descriptions in the various frameworks, illustrating the degree of reformulation needed when extending the described language|a strong indicator of modularity. Throughout, it is assumed that the reader has some familiarity with the concepts and notation of denotational and structural operational semantics. Familiarity with the basic notions of monads and monad transformers is not a prerequisite. It is well-known 5,12,13,22] that the cause of poor modularity in conventional denotational semantic descriptions is the unrestricted use of (typed)-notation to specify semantic entities. When the described language is extended with unanticipated new constructs, the domains of denotations may need to be changed, and then the description of the old constructs may have to be completely reformulated to adapt it to the new domains. A small-scale illustration of the poor extensibility in denotational semantics is provided in Appendix A. Action semantics 15,16,18,23] improves the modularity of denotational semantics by taking denotations to be so-called actions, which are expressed using a xed action notation consisting of various primitives and combinators|a few of them are listed in Appendix B. The primary interpretation of action notation is, …

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Semantics, modularity, and rewriting logic

A complete formal semantic description of a practical programming language (such as Java) is likely to be a lengthy document, regardless of which semantic framework is being used. Good modularity of the description is important to the person(s) developing it, to facilitate reuse, change, and extension. Unfortunately, the conventional versions of the major semantic frameworks have rather poor mo...

متن کامل

Logical Specification of Operational Semantics

Various logic-based frameworks have been proposed for specifying the operational semantics of programming languages and concurrent systems, including inference systems in the styles advocated by Plotkin and by Kahn, Horn logic, equational specifications, reduction systems for evaluation contexts, rewriting logic, and tile logic. We consider the relationship between these frameworks, and assess ...

متن کامل

Towards a Module System for K

Research on the semantics of programming languages has yielded a wide array of notations and methodologies for defining languages and language features. An important feature many of these notations and methodologies lack is modularity: the ability to define a language feature once, insulating it from unrelated changes in other parts of the language, and allowing it to be reused in other languag...

متن کامل

Modular Termination of r-Consistent and Left-Linear Term Rewriting Systems

A modular property of term rewriting systems is one that holds for the direct sum of two disjoint term rewriting systems iff it holds for every involved term rewriting system. A term rewriting system is r-consistent iff there is no term that can be rewritten to two different variables. We show that the subclass of left-linear and r-consistent term rewriting systems has the modular termination p...

متن کامل

On Deterministic Conditional Rewriting Computation Structures Group Memo December

The class of Deterministic Conditional Term Rewriting Systems DCTRSs is of utmost importance for the tight relationships exhib ited with functional programming logic programming and inductive reasoning However its analysis is extremely di cult and to date there are only very few works on the subject each analyzing a partic ular aspect of DCTRSs In this paper we perform a thorough analysis of DC...

متن کامل

On Deterministic Conditional Rewriting

The class of Deterministic Conditional Term Rewriting Systems (DCTRSs) is of utmost importance for the tight relationships exhibited with functional programming, logic programming and inductive reasoning. However, its analysis is extremely diicult, and to date there are only very few works on the subject, each analyzing a particular aspect of DCTRSs. In this paper, we perform a thorough analysi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007